package cn.wolfcode.statusenum;

import lombok.Getter;

@Getter
public enum ConsumptionStatusEnum {
    CONSUME(0,"待结算"),
    AUDIT(1,"待审核"),
    FINISH(2,"归档"),
    FAILURE(3,"坏账");

    private Integer value;
    private String name;

    ConsumptionStatusEnum(Integer value,String name){
        this.name = name;
        this.value = value;
    }

    public static String getName(Integer value){

        ConsumptionStatusEnum[] values = values();
        for (ConsumptionStatusEnum consumptionStatusEnum : values){
            if (consumptionStatusEnum.value.equals(value)){
                return consumptionStatusEnum.name;
            }
        }
        return null;
    }

}
